﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Detail.aspx.vb" Inherits="Lens.Detail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style2
        {
            font-family: "Segoe UI";
            font-size: large;
        }
        .style3
        {
            font-family: "Segoe UI";
            font-size: medium;
        }
        .style5
        {
            font-size: xx-large;
        }
        .style4
        {
            text-decoration: underline;
            font-size: x-large;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p class="style2">
        <strong><span class="style5"><span class="style4">
        <a href="list.aspx">List</a></span>&gt;&gt;Detail</span></strong></p>
    <p>
        <br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataSourceID="lensdetailSqlDataSource1" Width="913px">
            <Columns>
                <asp:BoundField DataField="PictureTitle" HeaderText="PictureTitle" 
                    SortExpression="PictureTitle" />
                <asp:BoundField DataField="Location" HeaderText="Location" 
                    SortExpression="Location" />
                <asp:BoundField DataField="Description" HeaderText="Description" 
                    SortExpression="Description" />
                <asp:BoundField DataField="NameOfUploader" HeaderText="NameOfUploader" 
                    SortExpression="NameOfUploader" />
                <asp:BoundField DataField="CameraUsed" HeaderText="CameraUsed" 
                    SortExpression="CameraUsed" />
                <asp:ImageField DataImageUrlField="Picture" HeaderText="Picture">
                    <ControlStyle CssClass="uploadedPicture" />
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:ImageField>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="lensdetailSqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:lensPicConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:lensPicConnectionString.ProviderName %>" 
            SelectCommand="SELECT [PictureTitle], [Location], [Description], [NameOfUploader], [CameraUsed], [Picture] FROM [lenspic] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
    </p>
    <p>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            DataSourceID="commentsSqlDataSource1" Height="178px" Width="910px">
            <Columns>
                <asp:TemplateField HeaderText="Comments">
                              
                    <ItemTemplate>

                     <div style = "background-color:Silver">
                     <span>
                        <b><%# Eval("Title") %></b><br /></span>
                        <%# Eval("Author") %><br />
                         <%# Eval("Comment") %><br />
                        </div>

                </ItemTemplate>

                <AlternatingItemTemplate>

                    <div style = "background-color:White">
                     <span>
                    <b><%# Eval("Title") %></b><br /></span>
                     <%# Eval("Author") %><br />
                     <%# Eval("Comment") %><br />
               </div>
                
                </AlternatingItemTemplate>           
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="commentsSqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:lensPicConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:lensPicConnectionString.ProviderName %>" 
            SelectCommand="SELECT [Author], [Comment], [Title] FROM [Comments] WHERE ([PictureID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="PictureID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p class="style2">
        Add Your Comment</p>
    <p>
    &nbsp;<span class="style3"> Your Name </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    </p>
    <p>
    &nbsp;<asp:TextBox ID="tb_Author" runat="server" Width="469px"></asp:TextBox>
    </p>
    <p class="style3">
        Title</p>
    <p>
    &nbsp;<asp:TextBox ID="tb_Title" runat="server" Width="469px"></asp:TextBox>
        &nbsp;</p>
    <p class="style3">
        Your Comment</p>
    <p>
        <asp:TextBox ID="tb_Comment" runat="server" Height="182px" TextMode="MultiLine" 
            Width="469px"></asp:TextBox>
    </p>
    <p>
        <asp:Button ID="Button1" runat="server" Text="Post Comment" Width="183px" />
    </p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
    </p>
    <p>
    </p>
</asp:Content>
